<template>
	<view>
		页面生命周期测试
		<view class="uni-padding-wrap uni-common-mt">
		<view v-for="index in count">
			<view style="height: 150rpx;background-color: aqua;margin: 5rpx;">
				测试数据{{index}}
			</view>
		</view>
		</view>
		<view>------真的没了------</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				count:20
			}
		},
		onLoad(options){
			console.log("Life cycle页面加载");
		},
		onShow(){
			console.log("Life cycle-------onShow");
		},
		onReady(){
			console.log("Life cycle-------onReady");
		},
		onHide() {
			console.log("Life cycle-------onHide");
		},
		onUnload() {
			console.log("Life cycle-------onUnload");
		},
		onPullDownRefresh() {//下拉刷新
			console.log("Life cycle-------onPullDownRefresh开始刷新");
			//数据更新
			setTimeout(()=>{
				uni.stopPullDownRefresh();
				console.log("Life cycle-------刷新完成");
			},2000)
		},
		onReachBottom() {
			// 数据加载
			console.log("到底了--------");
			if(this.count<200)
			this.count=this.count+20;
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
